package runner;
import generator.*;
import io.FastaReadWrite;
import io.MotifReadWrite;

import java.util.*;

public class ParameterGenerator {

	static double [] icpcArrs = {1.0, 1.5, 2.0};
	static double icpcDefault = 1.5;
	
	static  int [] mlArrs = {6,7,8};
	static int mlDefault = 6;
	
	static int [] scArrs = {5, 10, 20};
	static int scDefault = 10;
	
	static int sl = 500;
	static int numIters = 10;
	
	public static void main(String [] args)
	{
		int total = 0;
		for (double icpc : icpcArrs)
		{
			run(icpc, mlDefault, scDefault);
		}
		
		for (int ml : mlArrs)
		{
			run(icpcDefault, ml, scDefault);

		}
		
		for (int sc : scArrs)
		{
			run(icpcDefault, mlDefault, sc);

		}

		System.out.println("no problemo" + total);
	}

	public static void run(double icpc, int ml, int sc)
	{
		for (int iter = 0; iter < numIters; iter++)
		{
			String [] returnedSeq = return_SC_randomsequences.returnSCSequences(sc, sl);
			String [] bindingSites = new String[sc];
			Vector<Vector<Double>> randomMotifs = MotifGenerator.getRandomMotif(ml, icpc);

			for (int currSc = 0; currSc < sc; currSc++)
			{
				String bindingSite = GenerateSCBindingSites.generateSCBindingSites(randomMotifs);
				bindingSites[currSc] = bindingSite;
//				System.out.println(bindingSite);
			}
			returnedSeq = return_SC_randomsequences.plantSampleSites(returnedSeq, bindingSites);
			int [] randomIndexArray = return_SC_randomsequences.getRandomIndexes();
			FastaReadWrite.write(returnedSeq, randomIndexArray, bindingSites, icpc, ml, sc);
			MotifReadWrite.saveFile(randomMotifs, ml);
		}
	}
}
